Skip to content

node_cpu: document an invocation that runs - #99

Merged
MJohnson459 merged 1 commit into
mainfrom
fix-node-cpu-invocation
Aug 12, 2026
Merged

node_cpu: document an invocation that runs#99
MJohnson459 merged 1 commit into
mainfrom
fix-node-cpu-invocation

Conversation

@MJohnson459

Copy link
Copy Markdown
Contributor

Follow-up to #96, from its review.

python -m mote_bringup.tools.node_cpu — the form node_cpu.py's own docstring
gave — does not run:

$ pixi run -- python -m mote_bringup.tools.node_cpu --help
ModuleNotFoundError: No module named 'mote_bringup.tools'

mote_bringup/tools/ has no __init__.py, so setup.py's find_packages()
never picks it up. That is deliberate: these are harnesses run from a checkout,
not code the robot installs, which is why every sibling tool (slip_replay,
icp_excursions, odom_health, icp_gate_replay, camera_layer_decay)
documents the path form. node_cpu was the only one claiming otherwise, and the
tool itself was always invoked correctly during the measurements — by path on the
Pi — so nothing exercised the documented form.

The review found two occurrences in node_cpu.py; there were four. The same
broken form was in docs/tuning/2026-08-11-monitor-cpu/runs.txt, and the tuning
doc carried a bare mote_bringup/tools/node_cpu.py --summary <csv>, which is not
a runnable command either.

All four now use pixi run node-cpu — the task #96 already added, and the form
camera_layer_decay documents. Pixi appends trailing arguments, so
--summary/--nodes/--duration pass straight through; verified by
re-deriving the figures the tuning doc quotes:

$ pixi run node-cpu --summary docs/tuning/2026-08-11-monitor-cpu/probe-tf.csv
{ "samples": 90, "span_s": 89.1, ... "cpu_probe_floor": {"mean": 0.5, ...} }

The alternative fix — adding mote_bringup/tools/__init__.py so -m works — was
rejected: it would make find_packages() ship the tools into the install space
and onto the robot, a packaging change nobody asked for, and would leave
node_cpu the odd one out among its siblings in the opposite direction.

Docs only: 4 lines across 3 files, no behaviour change. pre-commit run --all-files clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X6o6x5Nn7QYUMxg2F3Wy2t

`python -m mote_bringup.tools.node_cpu` raises `ModuleNotFoundError: No module
named 'mote_bringup.tools'`. `mote_bringup/tools/` has no `__init__.py`, so
setup.py's `find_packages()` never picks it up -- deliberately, since these are
harnesses run from a checkout and not code the robot installs. Every sibling
tool documents the path form for that reason; node_cpu was the only one
claiming otherwise, in its two usage examples and in the tuning run notes.

Use `pixi run node-cpu`, which is the task this tool already ships with and the
form camera_layer_decay documents (pixi appends trailing arguments, so
`--summary`/`--nodes` pass straight through). Reported by review on #96.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X6o6x5Nn7QYUMxg2F3Wy2t
@MJohnson459
MJohnson459 merged commit 3173a6b into main Aug 12, 2026
5 checks passed
@MJohnson459
MJohnson459 deleted the fix-node-cpu-invocation branch August 12, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant